<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>组件混入</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
    <div id="应用">
        <com1 标题="混入"></com1>
    </div>
    <script>
        const 应用 = Vue.createApp()
        const 混入 = {
            props: ['标题']
        }
        const 组件1 = {
            mixins: [混入],
            template: `
                <div style="border: red solid 2px;">
                    {{标题}}
                </div>
            `,
        }
        应用.component('com1', 组件1)
        应用.mount('#应用')
    </script>
</body>
</html>